Test Tool Action
Used to test a specific tool action. This executes the action with provided parameters and returns detailed results including execution time, request/response details, and any errors.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/tools/{tool_id}/test-action/{action_id} |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/tools/{tool_id}/test-action/{action_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"parameters": {
"customer_id": "12345",
"include_orders": true
},
"test_config": {
"timeout_override": 60,
"skip_validation": false
},
"extraction_only": false,
"project_key": "YOUR_PROJECT_KEY"
}'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tool_id | string | Yes | The unique identifier of the tool. |
| action_id | string | Yes | The unique identifier of the action to test. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
| Content-Type | application/json | Yes | Data type, must be application/json. |
Request Body
Request Body Schema
{
"parameters": {
"additionalProp1": {}
},
"test_config": {
"additionalProp1": {}
},
"extraction_only": false,
"project_key": "string"
}
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| parameters | object | Yes | Dictionary of input parameters for the action (based on action's InputParameters definition). |
| test_config | object | No | Optional test-specific configuration overrides. |
| extraction_only | boolean | No | If true, only test parameter extraction without executing the action (default: false). |
| project_key | string | Yes | The project key for your project. |
Test Configuration Options
| Field | Type | Description |
|---|---|---|
| timeout_override | integer | Override the default action timeout in seconds. |
| skip_validation | boolean | Skip input parameter validation (for testing edge cases). |
| mock_response | object | Provide a mock response instead of calling the actual endpoint. |
| debug_mode | boolean | Enable verbose logging for debugging. |
note
Action Testing Details
- The test executes the action in the same way it would be executed by an AI agent
- Authentication credentials configured for the tool are used
- Rate limiting may apply depending on tool configuration
- The test counts toward tool usage metrics
- Sensitive data in responses may be partially masked for security
tip
Best practices for testing actions:
- Start with simple parameter values to verify basic functionality
- Test with edge cases and boundary values
- Verify error handling with invalid parameters
- Check response time for performance issues
- Test authentication by using the actual tool credentials
- Use extraction_only mode to test parameter extraction logic first
- Test with production-like data when possible
The test results help you:
- Validate action configuration is correct
- Verify parameter definitions and types
- Confirm authentication is working
- Check response parsing and extraction
- Identify performance bottlenecks
- Debug integration issues
- Ensure error handling works as expected
Response
Success Response (200 OK)
Returns detailed test execution results.
{
"success": true,
"result": "{\"customer_id\": \"12345\", \"name\": \"John Doe\", \"email\": \"john@example.com\", \"orders\": []}",
"error": null,
"execution_time": 342,
"request_details": {
"method": "GET",
"url": "https://api.example.com/v1/customers/12345",
"headers": {
"Authorization": "Bearer ***masked***",
"Content-Type": "application/json"
},
"query_params": {
"include_orders": "true"
},
"body": null
},
"response_details": {
"status_code": 200,
"headers": {
"content-type": "application/json",
"content-length": "245"
},
"body": "{\"customer_id\": \"12345\", \"name\": \"John Doe\", \"email\": \"john@example.com\", \"orders\": []}",
"extracted_data": {
"customer_id": "12345",
"name": "John Doe",
"email": "john@example.com"
}
},
"timestamp": "2026-01-12T07:45:11.899Z",
"project_key": "YOUR_PROJECT_KEY"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the action executed successfully. |
| result | string | The result of the action execution (may be JSON string or text). |
| error | string | Error message if the action failed (null if successful). |
| execution_time | integer | Execution time in milliseconds. |
| request_details | object | Details about the HTTP request made. |
| response_details | object | Details about the HTTP response received. |
| timestamp | string | ISO 8601 timestamp when the test was executed. |
| project_key | string | The project key used for the test. |
Request Details Fields
| Field | Type | Description |
|---|---|---|
| method | string | HTTP method used (GET, POST, PUT, DELETE, PATCH). |
| url | string | Complete URL that was called. |
| headers | object | HTTP headers sent (sensitive data masked). |
| query_params | object | Query parameters included in the request. |
| body | string | Request body (if applicable). |
Response Details Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code received. |
| headers | object | Response headers received. |
| body | string | Response body received. |
| extracted_data | object | Data extracted based on OutputParametersExtraction rules (if configured). |
Failed Test Response
Returns error details when the action test fails.
{
"success": false,
"result": null,
"error": "Connection timeout after 30 seconds",
"execution_time": 30000,
"request_details": {
"method": "GET",
"url": "https://api.example.com/v1/customers/12345",
"headers": {
"Authorization": "Bearer ***masked***"
}
},
"response_details": null,
"timestamp": "2026-01-12T07:45:11.899Z",
"project_key": "YOUR_PROJECT_KEY"
}
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"body",
"parameters",
"customer_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., body field). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Common Test Scenarios
| Scenario | Description | Expected Result |
|---|---|---|
| Valid Parameters | All required parameters provided correctly | success: true, valid result |
| Missing Parameters | Required parameters not provided | Validation error (422) |
| Invalid Authentication | Authentication credentials are incorrect | success: false, authentication error |
| Timeout | Action takes longer than timeout limit | success: false, timeout error |
| Invalid Response | API returns unexpected format | success: false, parsing error |
| Rate Limited | Too many requests in short time | success: false, rate limit error |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Test Completed - Check success field for result | Success |
| 400 | Bad Request - Invalid test parameters | Bad Request |
| 404 | Not Found - Tool or action does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |
| 500 | Internal Server Error - Test execution failed | Internal Server Error |